package com.zzr.jdk8.source.demo.collection;

import org.junit.Test;

import java.util.Hashtable;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @author: xiaomi
 * @date: 2021/9/14
 * @description:
 */
public class ConcurrentHashMapDemo {

    @Test
    public void newMap() {
        ConcurrentHashMap map = new ConcurrentHashMap();
        int num = 1;
        for (int i = 0; i < 30; i++) {
            map.put(num, i);
            num <<= 1;
        }
    }
}
